#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int sum = 1;
int a = 1;
int yzc(int n)
{
	while (n > sum)
	{
		a += 2;
		sum += 2 * a;
	}
	if (sum > n)
	{
		sum -= 2 * a;
		a -= 2;
	}
	return a;
}
int main()
{
	int n;
	char c;
	scanf("%d %c", &n, &c);
	int q = 0;
	for (int i = yzc(n); i >= 1; i -= 2, q++)
	{
		for (int j = 0; j < q; j++)
		{
			printf(" ");
		}
		for (int z = 0; z < i; z++)
		{
			printf("%c", c);
		}
		printf("\n");
	}
	q -= 2;
	for (int i = 3; i <= a; i += 2,q--)
	{
		for (int j = 0; j < q; j++)
		{
			printf(" ");
		}
		for (int z = 0; z < i; z++)
		{
			printf("%c", c);
		}
		printf("\n");
	}
	printf("%d", n - sum);
	return 0;
}
